package com.xbts.common.utils.aspose;

import java.util.HashMap;
import java.util.Map;

/**
 * Singleton
 *
 * @author swx
 * @version v1.0
 * @date 2022/10/27 13:15
 */
public class AsposeSingleton {

    private Map<String, IFileConvert> map = new HashMap<>();

    private AsposeSingleton() {
    }

    public static AsposeSingleton instance() {
        return SingletonHolder.INSTANCE;
    }

    private static class SingletonHolder {
        private static final AsposeSingleton INSTANCE = new AsposeSingleton();
    }

    public IFileConvert get(String type) {
        return map.get(type);
    }

    void put(String type, IFileConvert fileConvert) {
        map.put(type, fileConvert);
    }

}
